﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Web;

namespace FrontEndPlus
{
    public class validacionControles
    {
        //METODO PARA VALIDAR EL USO DE EMAIL EN UN TEXTBOX
        public Boolean emailBienEscrito(String email)
        {
            String expresion;
            expresion = "\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*";
            if (Regex.IsMatch(email, expresion))
                if (Regex.Replace(email, expresion, String.Empty).Length == 0)
                    return true;
                else
                    return false;
            else
                return false;
        }
    }
}